// 2025/3/30
// https://leetcode.cn/problems/climbing-stairs/description/?envType=study-plan-v2&envId=top-100-liked
// 爬楼梯

class Solution {
    public:
        int climbStairs(int n) {
            int ppre = 0, pre = 0, cur = 1;
            while(n--)
            {
                ppre = pre;
                pre = cur;
                cur = pre + ppre;
            }
            return cur;
        }
    };